# -*- encoding:ascii -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 8
_modified_time = 1357473070.948
_enable_loop = True
_template_filename = 'resources/LehrVeranstaltungOpen.html'
_template_uri = 'resources/LehrVeranstaltungOpen.html'
_source_encoding = 'ascii'
_exports = []


def render_body(context,**pageargs):
    __M_caller = context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        lerneinheitlist = context.get('lerneinheitlist', UNDEFINED)
        LehrVeranstaltung = context.get('LehrVeranstaltung', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\r\n\r\n\r\n<h2>Lehrveranstaltung Informationen</h2>\r\n\r\n\r\n <form action="/Lehrveranstaltungen/save" method="post" accept-charset="utf-8">\r\n')
        # SOURCE LINE 8
        if LehrVeranstaltung == None or LehrVeranstaltung.Bezeichner == None:
            # SOURCE LINE 9
            __M_writer(u'                Bezeichner<input type="text" name="Bezeichner" value="" />\r\n')
            # SOURCE LINE 10
        else:
            # SOURCE LINE 11
            __M_writer(u'                Bezeichner<input readonly  type="text" name="Bezeichner" value="')
            __M_writer(unicode(LehrVeranstaltung.Bezeichner))
            __M_writer(u'" />\r\n')
        # SOURCE LINE 13
        __M_writer(u'        \r\n')
        # SOURCE LINE 14
        if LehrVeranstaltung == None or LehrVeranstaltung.Beschreibung == None:
            # SOURCE LINE 15
            __M_writer(u'                Beschreibung<input type="text" name="Beschreibung" value="" />\r\n')
            # SOURCE LINE 16
        else:
            # SOURCE LINE 17
            __M_writer(u'                Beschreibung<input type="text" name="Beschreibung" value="')
            __M_writer(unicode(LehrVeranstaltung.Beschreibung))
            __M_writer(u'" />\r\n')
        # SOURCE LINE 19
        __M_writer(u'   \r\n        <button type="submit">Save</button>\r\n      \r\n</form>\r\n\r\n\r\n\r\n')
        # SOURCE LINE 26
        if LehrVeranstaltung != None:
            # SOURCE LINE 27
            __M_writer(u'<h2>Lerneinheit Erstellen</h2>\r\n<a href="/Lerneinheiten/open">Neue Lerneinheit Erstellen</a> \r\n<h2>Lerneinheiten Liste</h2>\r\n<ul>\r\n')
            # SOURCE LINE 31
            for a in lerneinheitlist:
                # SOURCE LINE 32
                __M_writer(u'     <li>\r\n            <a href="/Lerneinheiten/open?LerneinheitNummer=')
                # SOURCE LINE 33
                __M_writer(unicode(a.Nummer))
                __M_writer(u'">')
                __M_writer(unicode(a.Bezeichner))
                __M_writer(u' ')
                __M_writer(unicode(a.Termin))
                __M_writer(u'</a> \r\n            <a href="/Lerneinheiten/Remove?LerneinheitNummer=')
                # SOURCE LINE 34
                __M_writer(unicode(a.Nummer))
                __M_writer(u'">Remove</a>   \r\n    </li>\r\n')
            # SOURCE LINE 37
            __M_writer(u'</ul>\r\n')
        # SOURCE LINE 39
        __M_writer(u'\r\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


